package com.jike.jkgame.db;

import android.database.sqlite.SQLiteDatabase;

public class UserResourcesTable {
	public static final String TABLE_NAME = "userres";
	private static final String CREATE_TABLE = "create table "
			+ TABLE_NAME
			+ " (_id  integer primary key autoincrement, "
			+ "res integer, tid integer, " 
			+ "sid integer, level integer, exp integer, attack integer, defense integer, "
			+ "star integer, type integer, add_val integer, cast integer, UNIQUE(res, tid, sid) ON CONFLICT REPLACE);";

	public static void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_TABLE);
	}

	public static void onUpgrade(SQLiteDatabase db, int oldVersion,
			int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
		onCreate(db);
	}
}
